package com.system.common;


import com.system.entity.vo.RspResultVO;

/**
 * 基础控制层
 *
 * @author 佛冷
 * @date 2019/10/8
 */
public class BaseController {

    public RspResultVO returnSuccess() {
        return new RspResultVO(ResponseCode.RESPONSE_SUCCESS);
    }

    public RspResultVO returnSuccess(Object data) {
        return new RspResultVO(ResponseCode.RESPONSE_SUCCESS, data);
    }

    public RspResultVO returnError() {
        return new RspResultVO(ResponseCode.RESPONSE_ERROR);
    }

    public RspResultVO returnResult(ResponseCode responseCode) {
        return new RspResultVO(responseCode);
    }

    public RspResultVO returnResult(int code, String msg, Object data) {
        return new RspResultVO(code, msg, data);
    }

    public RspResultVO returnResult(int code, String msg) {
        return new RspResultVO(code, msg, null);
    }


}
